package co.yixiang.weixin.biz.controller;

import co.yixiang.weixin.biz.service.WxConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/weixinConfig")
public class WeixinConfigController {

    @Autowired
    private WxConfigService wxConfigService;

    /**
     * 刷新所有微信配置
     */
    @GetMapping("/refreshAllWxConfig")
    public void refreshAllWxConfig(){
        wxConfigService.refreshAllWxConfig();
    }

    /**
     * 刷新微信支付配置
     */
    @GetMapping("/refreshWxPayConfig")
    public void refreshWxPayConfig(){
        wxConfigService.refreshWxPayConfig();
    }
}
